package com.bpmn.flow.service;

import com.bpmn.common.pojo.PageResult;
import com.bpmn.flow.controller.form.ModelForm;
import com.bpmn.flow.controller.query.FlowModelQuery;
import com.bpmn.flow.controller.vo.ModelVo;
import org.flowable.bpmn.model.BpmnModel;

/**
 * @author rain
 */
public interface ModelService {

    PageResult<ModelVo> getFlowModels(FlowModelQuery flowModelQuery);

    boolean createFlowModel(ModelForm modelForm);

    boolean updateFlowModel(ModelForm modelForm);

    boolean modelDesign(String id, String xml);

    ModelVo getFlowModelById(String id);

    boolean modelDeploy(String id);

    boolean modelDelete(String id);
    
    void validateProcess(BpmnModel bpmnModel);
}
